package org.wyz.domain;


import java.sql.Timestamp;
import java.util.List;

/**
 * Created by wyz on 2018/1/22.
 */
public class User {

    private Long id;            // 用户ID
    private String username;    // 用户名
    private String password;    // 密码
    private String nickname;    // 绰号
    private boolean enabled;    // 激活
    private List<Role> roles;   // 角色列表
    private String email;       // 邮件
    private String userface;    // 用户脸
    private Timestamp regTime;  // 注册时间


    /*--------------- 生成 无参数的构造器 ---------------*/
    /*--------------- 生成 有参数的构造器 ---------------*/
    /*--------------- 生成 getting和setting方法名 ------*/
    /*--------------- 生成 转换字符串方法名--------------*/

    public User() {

    }
    public User(Long id, String username, String password, String nickname, boolean enabled, List<Role> roles, String email, String userface, Timestamp regTime) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.nickname = nickname;
        this.enabled = enabled;
        this.roles = roles;
        this.email = email;
        this.userface = userface;
        this.regTime = regTime;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public List<Role> getRoles() {
        return roles;
    }

    public void setRoles(List<Role> roles) {
        this.roles = roles;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getUserface() {
        return userface;
    }

    public void setUserface(String userface) {
        this.userface = userface;
    }

    public Timestamp getRegTime() {
        return regTime;
    }

    public void setRegTime(Timestamp regTime) {
        this.regTime = regTime;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", nickname='" + nickname + '\'' +
                ", enabled=" + enabled +
                ", roles=" + roles +
                ", email='" + email + '\'' +
                ", userface='" + userface + '\'' +
                ", regTime=" + regTime +
                '}';
    }
}
